<?php
// +--------------------------------------------------------------------------
// | ZAIYOUDAO [ 载攸道 先顺得常 ] <http://www.zaiyoudao.com>
// +--------------------------------------------------------------------------
// | Copyright © 2009-2016 载攸道 版权所有 <TEL:17090888854>
// +--------------------------------------------------------------------------
// | Project: YiPHP [ 我会的仅仅是偷懒！ ] <http://www.yiphp.com>
// +--------------------------------------------------------------------------
// | Author: 牛很多戒很多不戒 <n@isdce.com> <http://juexue.wang>
// +--------------------------------------------------------------------------

/**
 * 系统信息插件
 */
namespace Addon\TeamInfo\Controller;
use Addon\TeamInfo\Controller\CommonController;

/**
 * 系统信息插件 
 */
class TeamController extends CommonController{
	
	/**
	 * 系统信息 
	 */
	public function Info(){
		
		
		action_log('addon_teaminfo_team_info'); 

		//页面配置
		$page = array(
			
			'title'=>'产品团队',
			'keywords'=>'YiPHP [ 我会的仅仅是偷懒！]',
			'description'=>'YiPHP [ 我会的仅仅是偷懒！]',
			'author'=>'YiPHP',
			'robots' => 'all',
		
		);
		
		$this->assign('page',$page);
		
		$data  = array(
		
			'producer' =>'牛宏达',
			'developer' =>'张瞻 郭宇 闫帅',
			'design' =>'周敦 常鹏 惠勇',
			'ui' =>' 梁思雨 阮丽楠 王文雪',
			'fe' =>'杨旭 谢瑞河',
			'website' =>'http://www.yiphp.com',
			//'tel' =>'17090888854',
			'bug' =>'http://www.yiphp.com/Software/Feedback/Bug.html',
		);
			
		
		$this->assign('data',$data);
		
    
		$this->view();
    }
	
	/**
	 * 通过API借口获得更新信息
	 * @author 牛很多戒很多不戒 <n@isdce.com> <http://juexue.wang>
	 */
    public function Log(){
		
		action_log('addon_systeminfo_system_log'); 
		
		$list = S('list');
		
		if(!$list){
			
			
			$url  = 'http://api.yiphp.com/log.html';
			$list = file_get_contents($url);  

			$list = json_decode($list,true);
		
			//缓存数据信息2个小时
			S('list',$list,7200);
	
		}
	
		
		$this->assign('list',$list);
		
        $this->view();
    }
	
	/**
	 * 实例化ThinkModel
	 * @author 牛很多戒很多不戒 <n@isdce.com> <http://juexue.wang>
	 */
	protected function _model(){
		
        return new \Think\Model();
		
    }
	
	/**
	 * 获得mysql版本信息
	 * @author 牛很多戒很多不戒 <n@isdce.com> <http://juexue.wang>
	 */
    private function _mysql_version(){
		
        $Model = self::_model();
        $version = $Model->query("select version() as ver");
        return $version[0]['ver'];
		
    }
	
	
	
}